package cn.hackcloud.javabase;

import org.junit.Test;

import java.math.BigDecimal;

public class TestDecimal {
    @Test
    public void test() {
        double d=0.0002335;
        System.out.println(d);
        BigDecimal value =  BigDecimal.valueOf(d).setScale(6, BigDecimal.ROUND_UP);
        System.out.println(value);
    }
}
